package com.hdax.dm.controller;

import com.hdax.dm.dto.CommonResponse;
import com.hdax.dm.dto.DtoUtil;
import com.hdax.dm.dto.base.CarouselDto;
import com.hdax.dm.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ImageController {

    @Autowired
    private ImageService imageService;

    //轮播图
    @PostMapping(path = "/carousel")
    public CommonResponse<List<CarouselDto>> carousel(){
        CommonResponse commonResponse = DtoUtil.returnSuccess("", imageService.carousel());
        return commonResponse;
    }

}
